package cc.vv.btpartyjob.partyservice.adapter

import android.annotation.SuppressLint
import android.widget.TextView
import cc.vv.baselibrary.adapter.SimpleCommonAdapter
import cc.vv.baselibrary.adapter.holder.ExtendViewHolder
import cc.vv.btpartyjob.partyservice.R
import cc.vv.btpartyjob.partyservice.module.bean.StationBean

/**
 * 岗位列表adapter
 * Created by Chen.qi on 2018/10/24.
 */
class StationAdapter(layoutResId: Int) : SimpleCommonAdapter<StationBean>(layoutResId) {
    @SuppressLint("SetTextI18n")
    override fun convert(helper: ExtendViewHolder, item: StationBean, position: Int) {

        //岗位名称
        helper.getView<TextView>(R.id.tv_isl_itemName)?.text = item.postName

        //招聘人数
        helper.getView<TextView>(R.id.tv_isl_personNum)?.text = "招${item.jobNum}人"

        //学历
        helper.getView<TextView>(R.id.tv_isl_education)?.text = item.education

        //经验
        helper.getView<TextView>(R.id.tv_isl_experience)?.text = "${item.workYear}年"

        //学历
        helper.getView<TextView>(R.id.tv_isl_education)?.text = item.education

        //匹配人员
        helper.getView<TextView>(R.id.tv_isl_matchingPerson)?.text = "匹配人员：暂无"

        //薪资
        helper.getView<TextView>(R.id.tv_isl_money)?.text = item.salary

        //时间
        helper.getView<TextView>(R.id.tv_isl_itemTime)?.text = item.createTime
    }
}